**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"

cd "$workdata"


**# Bookmark #2 Table 2 Panel A: Below College
use "$outfile/City_regression.dta",clear

reghdfe codemission c.belowcl##i.post i.city,absorb(i.province#i.year) cluster(i.province i.year)
boottest 1.post#c.belowcl,seed(11111)

*Firm-level COD Emission
use "$outfile/Firm_regression.dta",clear

reghdfe codemission c.belowcl##i.post i.province#i.year,absorb(i.id) cluster(i.province i.year)
boottest 1.post#c.belowcl,seed(11111)


*Firm Entry
use "$outfile/Firm_entry_regression.dta",clear

reghdfe entrynum c.belowcl##i.post i.city,absorb(i.province#i.year) cluster(i.province i.year)
boottest 1.post#c.belowcl,seed(11111)

*Firm Exit
use "$outfile/Firm_exit_regression.dta",clear

reghdfe exitnum c.belowcl##i.post i.city,absorb(i.province#i.year) cluster(i.province i.year)
boottest 1.post#c.belowcl,seed(11111)

**# Bookmark #3 Table 2 Panel B: Below HS
*City-level COD Emission
use "$outfile/City_regression.dta",clear

reghdfe codemission c.belowhs##i.post i.city ,absorb(i.province#i.year) cluster(i.province i.year)
boottest 1.post#c.belowhs,seed(11111)


*Firm-level COD Emission
use "$outfile/Firm_regression.dta",clear

reghdfe codemission c.belowhs##i.post i.province#i.year,absorb(i.id) cluster(i.province i.year)
boottest 1.post#c.belowhs,seed(11111)


*Firm Entry
use "$outfile/Firm_entry_regression.dta",clear

reghdfe entrynum c.belowhs##i.post i.city,absorb(i.province#i.year) cluster(i.province i.year)
boottest 1.post#c.belowhs,seed(11111)

*Firm Exit
use "$outfile/Firm_exit_regression.dta",clear

reghdfe exitnum c.belowhs##i.post i.city,absorb(i.province#i.year) cluster(i.province i.year)
boottest 1.post#c.belowhs,seed(11111)
